package com.gjp.mapper;

import com.baomidou.mybatisplus.annotations.SqlParser;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.gjp.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by gjp on 2017-6-2.
 * mapper要继承BaseMapper 里面有基本的CRUD，分页，条件查询等
 *
 * 这个文件可以不需要xml映射，但推荐建一个映射，容易扩展
 */
public interface UserMapper extends BaseMapper<User> {
    User selectOneTest();

    @SqlParser(filter = true)
    @Select("select id,age,name from user")
    List<User> selectS();
}
